<?php echo $this->Form->create('Post', array('type'	=> 'file', 'id'	=> 'submit_form' , 'class'	=> 'form-horizontal', 'novalidate'	=> 'novalidate')); 
echo $this->Form->input('user_id', array('type'	=> 'hidden', 'value'	=> $userID));
echo $this->Form->input('id');
?>
	<h3 class="block"><?php echo $title_for_layout;?></h3>
	<div class="form-group">
		<label class="control-label col-md-2">Title
			<span class="required">*</span>
		</label>
		<div class="col-md-8">
			<?php echo $this->Form->input('title', array('label'	=> false, 
															'div'	=> false, 
															'class'	=> 'form-control',
															'error' => array('attributes' => array('wrap' => 'span','class' => 'help-block'))
														)); 
			?>
														
														
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-md-2">Image
			<span class="required">*</span>
		</label>
		<div class="col-md-8">
			<?php echo $this->Form->input('Post.photo', array(   'label'	=> false, 
															'div'	=> false, 
															'class'	=> '',
															'error' => array('attributes' => array('wrap' => 'span','class' => 'help-block')),
															'type'	=> 'file'
														));
				echo $this->Form->input('Post.photo_dir', array('type'	=> 'hidden'));
			?>
														
														
		</div>
	</div>
	<div class="form-group">
		<label class="control-label col-md-2">Content
			<span class="required">*</span>
		</label>
		<div class="col-md-8">
			<?php echo $this->Form->input('content', array('label'	=> false, 
															'div'	=> false, 
															'class'	=> 'form-control',
															'error' => array('attributes' => array('wrap' => 'span','class' => 'help-block'))
														)); 
			?>
														
														
		</div>
	</div>
	<?php echo $this->Form->input('terms', array('label'	=> 'Taxonomy', 'type'	=> 'select', 'multiple'	=> 'checkbox')); ?>
	<div class="form-actions fluid">
		<div class="col-md-offset-3 col-md-9">
			<button class="btn green" type="submit">Submit</button>
			<?php 
				echo $this->Html->link('Cancel', array(
												 'controller'	=> 'posts',
												 'action'		=> 'admin_index'
											),
											array('class'	=> 'btn default'));
			?>
		</div>
	</div>	
</form>
